﻿/*
 
Celerity: Sensory Overload
Copright 2012 by Adam Hill, David Gannon, Thomas Tamblyn & Patrick Ytting
Contact: adam.hill@outlook.com
Website: adamhill.org
Licence: MS-Pl Licence
  
 */

using Celerity.ColourPalette;
using Celerity.Content;
using Celerity.Data;
using Celerity.Entities;
using Microsoft.Xna.Framework;
using System.Collections.Generic;

namespace Celerity.UI.Definition.Controls
{
    public class PanelStartControl : UIEntity
    {
        public override void ConfigureSelf()
        {
            IsPressable = true;
            DrawCondition = new UIDrawCondition
            {
                CheckGameState = true,
                CheckedGameStates = new List<GameState>
                        {
                            GameState.Menu
                        },
                CheckMenuState = true,
                CheckedMenuStates = new List<MenuState>
                        {
                            MenuState.MainMenu
                        },
            };
            Items = new List<UIEntityItem>
                    {
                        new UIEntityItem // Background
                        {
                            Size = this.Size,
                            Offset = this.Offset,
                            ImageDefault = ImageLibrary.TextureAccent,
                            ImagePressed = ImageLibrary.TextureAccentPressed,
                        },
                        new UIEntityItem // Play icon
                        {
                            Size = this.Size,
                            Offset = this.Offset,
                            ImageDefault = ImageLibrary.PlayBar,
                            ImagePressed = ImageLibrary.PlayBar,
                        },
                        new UIEntityItem // Play Text
                        {
                            ApplyRightAlign = true,
                            Size = this.Size + new Vector2(-75, 0),
                            Offset = this.Offset,// + new Vector2(-10, 0),
                            Font = FontLibrary.Light,
                            FontColorDefault = Palette.White,
                            FontColorPressed = Palette.White,
                            Text = ResxText.Play
                        },
                    };
        }
    }
}
